Skip to content

feat(code): file picker on quill autocomplete#2101

Merged
jonathanlab merged 3 commits into
mainfrom
ux/file-picker-quill
May 19, 2026
Merged

feat(code): file picker on quill autocomplete#2101
jonathanlab merged 3 commits into
mainfrom
ux/file-picker-quill

Conversation

@adamleithp
Copy link
Copy Markdown
Contributor

@adamleithp adamleithp commented May 8, 2026

Summary

  • Migrate FilePicker (Cmd+P jump-to-file) from cmdk + Radix Popover to quill Autocomplete* inside Dialog — same shape as the command palette in feat(code): cmd palette on quill autocomplete + bump quill #2100.
  • Drop FilePicker.css (cmdk-specific selectors); quill primitives ship the styling.
  • Keep fzf as the source of truth: items={sections} + filter={null} so base-ui doesn't re-filter on top of fzf's fuzzy ranking.
  • Empty query now shows Recent + Other files groups (deduped) instead of recents-only — typing collapses to a single unlabeled group of fzf results.
  • Conditional pt-1 on the list when the first section is unlabeled (quill zeroes list padding-top after AutocompleteStatus).

Stacked on #2100 (ux/cmd-menu). Merge that first.

2026-05-08 07 10 03

Test plan

  • Open any task → Cmd+P opens the picker centered at top.
  • Empty query with no recents shows the full file list.
  • Open a file → reopen Cmd+P → "Recent" group shows just-opened file, "Other files" group lists the rest (no duplicates).
  • Typing fuzzy-matches name + path; "Recent"/"Other files" labels disappear during search.
  • ↑/↓ moves highlight, Enter opens the file in the split editor, Esc closes in one press.
  • Reopening the picker after closing resets the query.
  • pnpm --filter code typecheck clean.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 8, 2026

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
apps/code/src/renderer/features/command/components/FilePicker.tsx:91-96
The `className="block"` override on `AutocompleteItem` diverges from the sibling `CommandMenu` usage and may cancel out the default flex layout that quill's `AutocompleteItem` applies. With `display: block`, the `FileIcon` SVG, the filename text node, and the directory `<span>` will be rendered as inline content rather than flex-aligned siblings, which can produce misaligned or run-together text. `CommandMenu` omits this class and achieves correct icon + label alignment. Consider removing it, or wrapping children in a `<div className="flex items-center gap-2">` if an explicit flex row is needed.

```suggestion
              <AutocompleteItem
                key={file.path}
                value={file.path}
                onClick={() => handleSelect(file.path)}
              >
```

Reviews (1): Last reviewed commit: "feat(code): file picker on quill autocom..." | Re-trigger Greptile

Comment thread apps/code/src/renderer/features/command/components/FilePicker.tsx Outdated
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 8, 2026

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
apps/code/src/renderer/features/command/components/FilePicker.tsx:104
When `sections[0]?.label` is truthy the template literal resolves to `"max-h-[60vh] "` (trailing space). While harmless in practice, a simple ternary keeps intent clearer and avoids the superfluous whitespace.

```suggestion
            className={sections[0]?.label ? "max-h-[60vh]" : "max-h-[60vh] pt-1"}
```

Reviews (2): Last reviewed commit: "feat(code): file picker recent + other f..." | Re-trigger Greptile

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 8, 2026

Reviews (3): Last reviewed commit: "fix(code): cap empty-query file picker l..." | Re-trigger Greptile

Base automatically changed from ux/cmd-menu to main May 8, 2026 16:18
adamleithp and others added 3 commits May 19, 2026 16:11
@jonathanlab jonathanlab force-pushed the ux/file-picker-quill branch from e33ce98 to 9095035 Compare May 19, 2026 14:12
@jonathanlab jonathanlab enabled auto-merge (squash) May 19, 2026 14:15
@jonathanlab jonathanlab merged commit c76fbea into main May 19, 2026
15 checks passed
@jonathanlab jonathanlab deleted the ux/file-picker-quill branch May 19, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants